/*
 *------------------------------------------------------------------------------
 * @File      :    mai_log.h
 * @Date      :    2021-4-8
 * @Author    :    lomboswer <lomboswer@lombotech.com>
 * @Brief     :    Media Interface for MADP(Media Development Platform).
 *
 * Copyright (C) 2020-2021, LomboTech Co.Ltd. All rights reserved.
 *------------------------------------------------------------------------------
 */

#ifndef __MAI_LOG_H__
#define __MAI_LOG_H__
#include "log/log.h"

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

#define MADP_TRACE(level, fmt, arg...) \
	do{ \
		if (level == MADP_EN_ERR_LEVEL_DEBUG) \
			ALOGD("[Func]:%s [Line]:%d [Info]:" fmt, __FUNCTION__, __LINE__, ##arg); \
		else if (level == MADP_EN_ERR_LEVEL_INFO) \
			ALOGI("[Func]:%s [Line]:%d [Info]:" fmt, __FUNCTION__, __LINE__, ##arg); \
		else if (level == MADP_EN_ERR_LEVEL_WARNING) \
			ALOGW("[Func]:%s [Line]:%d [Info]:" fmt, __FUNCTION__, __LINE__, ##arg); \
		else if (level == MADP_EN_ERR_LEVEL_ERROR) \
			ALOGE("[Func]:%s [Line]:%d [Info]:" fmt, __FUNCTION__, __LINE__, ##arg); \
	}while(0)

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif

